package com.itc.bi.api;

import com.itc.bi.api.vo.DataSetVO;
import com.itc.common.core.constant.ServiceNameConstants;
import com.itc.bi.api.dto.DataSetDto;
import com.itc.bi.api.factory.BiFactory;
import com.itc.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(contextId = "BiService", value = ServiceNameConstants.BI
        , fallbackFactory = BiFactory.class)
public interface BiService {

    /**
     * 根据数据集ID查询数据集数据
     * @param dto
     * @return
     */
    @PostMapping(value = "feignClient/dataSet/query")
    R<DataSetVO> queryDataSetData(DataSetDto dto);

    /**
     * 根据数据集ID获取数据项
     * @param dto
     * @return
     */
    @PostMapping(value = "feignClient/dataSet/column")
    R<List> column(DataSetDto dto);
}
